#ifndef CONE_GEOMETRY_HH
#define CONE_GEOMETRY_HH

#include <cgmath/cgmath.hh>
#include "geometry.hh"

/// Simple cone geometry.
class cone_geometry : public geometry
{
public:
  cone_geometry (double r, double h);

  virtual double hit (const cgmath::ray_3d& r) const;
  virtual void   hit_surface_point (surface_point& sp) const;
  
protected:
  double radius;
  double height;

  mutable cgmath::vector_3d hit_point;
  mutable cgmath::vector_3d hit_normal;
};

#endif
